package com.kede.pojo;

import com.kede.PubConst;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author:Pr.li
 * @Date: create in 2023/7/15 12:24
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ShopProduct {

    private String title;

    /**
     * 主图
     */
    private String image;

    /**
     * 是否上架:0=否,1=是
     */
    private Integer switchStatus;

    /**
     * 分类类型 0 德币  1现金
     */
    private Integer type = PubConst.SCORE_CATE;

    private Integer count;

    @Override
    public int hashCode() {
        return title.hashCode();
    }
    @Override
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }else if (!(o instanceof ShopProduct)) {
            return false;
        }else {
            ShopProduct other = (ShopProduct)o;
            return title.equals(other.title);
        }
    }
}
